package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HlRoomTypeMapper;
import com.ruoyi.hotel.domain.HlRoomType;
import com.ruoyi.hotel.service.IHlRoomTypeService;

/**
 * 房间类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlRoomTypeServiceImpl implements IHlRoomTypeService 
{
    @Autowired
    private HlRoomTypeMapper hlRoomTypeMapper;

    /**
     * 查询房间类型
     * 
     * @param id 房间类型主键
     * @return 房间类型
     */
    @Override
    public HlRoomType selectHlRoomTypeById(Integer id)
    {
        return hlRoomTypeMapper.selectHlRoomTypeById(id);
    }

    /**
     * 查询房间类型列表
     * 
     * @param hlRoomType 房间类型
     * @return 房间类型
     */
    @Override
    public List<HlRoomType> selectHlRoomTypeList(HlRoomType hlRoomType)
    {
        return hlRoomTypeMapper.selectHlRoomTypeList(hlRoomType);
    }

    /**
     * 新增房间类型
     * 
     * @param hlRoomType 房间类型
     * @return 结果
     */
    @Override
    public int insertHlRoomType(HlRoomType hlRoomType)
    {
        hlRoomType.setCreateTime(DateUtils.getNowDate());
        return hlRoomTypeMapper.insertHlRoomType(hlRoomType);
    }

    /**
     * 修改房间类型
     * 
     * @param hlRoomType 房间类型
     * @return 结果
     */
    @Override
    public int updateHlRoomType(HlRoomType hlRoomType)
    {
        hlRoomType.setUpdateTime(DateUtils.getNowDate());
        return hlRoomTypeMapper.updateHlRoomType(hlRoomType);
    }

    /**
     * 批量删除房间类型
     * 
     * @param ids 需要删除的房间类型主键
     * @return 结果
     */
    @Override
    public int deleteHlRoomTypeByIds(Long[] ids)
    {
        return hlRoomTypeMapper.deleteHlRoomTypeByIds(ids);
    }

    /**
     * 删除房间类型信息
     * 
     * @param id 房间类型主键
     * @return 结果
     */
    @Override
    public int deleteHlRoomTypeById(Long id)
    {
        return hlRoomTypeMapper.deleteHlRoomTypeById(id);
    }
}
